package com.xixiu.theprojectthree.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xixiu.theprojectthree.common.entity.Category;
import com.xixiu.theprojectthree.dao.CategoryDao;
import com.xixiu.theprojectthree.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author XiXiu
 */
@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryDao categoryDao;

    @Override
    public Category queryById(Integer cid) {
        return categoryDao.queryById(cid);
    }

    @Override
    public List<Category> queryAll() {
        return categoryDao.queryAll();
    }

    @Override
    public int insert(Category category) {
        return categoryDao.insert(category);
    }

    @Override
    public int update(Category category) {
        return categoryDao.update(category);
    }

    @Override
    public int deleteById(Integer cid) {
        return categoryDao.deleteById(cid);
    }
}
